//
//  RecordListViewController.h
//  MoneyLog
//
//  Created by wicresoft on 5/31/11.
//  Copyright 2011 wicresoft. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "Database.h"

@class RecordListSettingViewCotroller;

@interface RecordListViewController : UIViewController<UITableViewDelegate,UITableViewDataSource> {
    NSMutableArray  *dataSourceArray;
    
    //NSInteger       searchSelectedScope;
    UIBarButtonItem *backItem;
    UIBarButtonItem *editButton;
    UIBarButtonItem *addButton;
    UIBarButtonItem *doneButton;
    UIBarButtonItem *flexSpace;
    UIBarButtonItem *segmentedButton;
    
    UIView              *dataView;
    UITableView         *_tableView;
    
    NSDate              *searchDate;
    int                 searchMode;     //0:日 1:月 2:年
    int                 year;
    int                 month;
    int                 day;
    
    CGRect              appRect;
    
    CATransition        *lastAnimation;
    BOOL                isHalfAnimation;

    int                 lastDisplayType;
    int                 lastSearchType;
    RecordListSettingViewCotroller *settingController; 
}

@property (nonatomic,retain) NSMutableArray         *dataSourceArray;
@property (nonatomic,retain) IBOutlet UIView        *dataView;
@property (nonatomic,retain) IBOutlet UITableView   *_tableView;

@property (nonatomic,retain) NSDate                 *searchDate;
@property (assign)           int                    searchMode;

@property (nonatomic,retain) CATransition           *lastAnimation;

-(void) loadRecord:(NSString *) strWhere;
-(void)loadData:(int)selectIndex;
-(IBAction) segmentedAction: (id) sender;
-(void)startAnimation;
-(void)commitAnimation;
-(void)setTitleText:(NSString *)text;

- (void)curlUp;

@end
